//对于数据请求的封装
import axios from 'axios'
function httpForList(){
    return axios({
        url:"https://m.maizuo.com/gateway?cityId=421100&pageNum=1&pageSize=10&type=1&k=164941",
        headers:{
            'X-Client-Info': '{"a":"3000","ch":"1002","v":"5.2.0","e":"1642648622150680337645569"}',
            'X-Host': 'mall.film-ticket.film.list'
        }

    })
}    
function httpForDetail(params){
    return axios({
        url:`https://m.maizuo.com/gateway?filmId=${params}&k=4001208`,
        headers:{
    'X-Client-Info': '{"a":"3000","ch":"1002","v":"5.2.0","e":"1642648622150680337645569"}',
    'X-Host': 'mall.film-ticket.film.info'}
        })
}

const http = axios.create({
    baseURL:`https://m.maizuo.com`,
    timeout:10000,
    headers:{
    'X-Client-Info': '{"a":"3000","ch":"1002","v":"5.2.0","e":"1642648622150680337645569"}',
    }
})
export  default {
    httpForList,
    httpForDetail  
} 
// axios自带的封装
